package com.example.servicebase.client;

import com.example.commonutils.ordervo.CourseForOrder;
import com.example.servicebase.entity.EduCourse;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class EduClientFallbackFactory implements FallbackFactory<EduClient> {
    @Override
    public EduClient create(Throwable throwable) {
        return new EduClient() {
            @Override
            public EduCourse getCourseById(String courseId) {
                return null;
            }

            @Override
            public CourseForOrder getCourseForOrder(String courseId) {
                return null;
            }

            @Override
            public void buyCount(String courseId) {

            }

            @Override
            public Integer getViewCount() {
                return 0;
            }

            @Override
            public Integer CourseCount() {
                return 0;
            }
        };
    }
}
